#pragma once

#include "FrameOperation.h"

class CConstructorDescription;

class CNewObjectOperation : public IFrameOperation
{
public:
    //ConstructorFunction might be nullptr, because native class has no constructor function
    CNewObjectOperation(std::shared_ptr<CTypeDescription> InClassDeclaration  ,std::shared_ptr<CConstructorDescription> InConstructorFunction )
    {
        assert(InClassDeclaration->IsClass()&& "only support class" );
        ClassDeclaration=InClassDeclaration;
        ConstructorFunction=InConstructorFunction;
    }

    virtual EFrameOperationType GetType() const override
    {
        return EFrameOperationType::NewObject;
    }

    std::shared_ptr<CTypeDescription> ClassDeclaration;
    std::shared_ptr<CConstructorDescription> ConstructorFunction;
};